#ifndef TGAME_H
#define TGAME_H

#include "tricardcommon.h"

class ThreeCardSavedGame;
class ThreeCardConnection;


//*************************************************************************************************
//
//  This class serves to define the interface that the CPokerConnection class uses to talk to all
//  classes that implement game specific logic (e.g., CHoldemGame and CStudGame).
//
//  kharmon.  09-28-05.  #5861.
//
//*************************************************************************************************
class TGame
{
public:

    virtual ~TGame() {};

    // called to tell the game to deal the cards.
	virtual bool8 deal(int32 balance)  = 0;

    // called to tell the game that the user has raised.
	virtual bool8 raise() = 0;

    // called to tell the game that the user has folded.
	virtual bool8 fold()  = 0;

    // this should return the amount of the user's initial bet.
	virtual int32 getAnteBet() = 0;

    virtual int32 getSideBet() = 0;

    // this is called when a game has been restored and the server 
    // wants the game to send the "restored" state to the client.
	virtual void send() = 0;

    // Theoretically should load the game state into the CSavedGame object...
    // in practice, not used right now.
	virtual void save(ThreeCardSavedGame*) = 0;

    // if the game is loaded and valid, should return true, otherwise false.
    virtual bool8 isGameOK() = 0;

    // Used to create TGame derived objects specifically for the requested game.
    static TGame * createGame(ThreeCardConnection *pConn, TriCardGameId eGameId, int32 nAnteBet, int32 nSideBet);

};


#endif